
<!DOCTYPE HTML>
<html lang="en" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>4.5.4 漂亮的排名|显示与队伍 · 命令进阶</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.2">
        
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../styles/website.css">
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="example5.html" />
    
    
    <link rel="prev" href="example3.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="Type to search" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    引言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../concepts/concepts.html">
            
                <a href="../../concepts/concepts.html">
            
                    
                    1 基础概念
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../concepts/space.html">
            
                <a href="../../concepts/space.html">
            
                    
                    1.1 坐标、朝向、区块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../concepts/time.html">
            
                <a href="../../concepts/time.html">
            
                    
                    1.2 时间、顺序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../concepts/execution.html">
            
                <a href="../../concepts/execution.html">
            
                    
                    1.3 命令执行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="../../concepts/selector/selector.html">
            
                <a href="../../concepts/selector/selector.html">
            
                    
                    1.4 目标选择器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.5" data-path="../../concepts/stats.html">
            
                <a href="../../concepts/stats.html">
            
                    
                    1.5 命令执行统计
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../common-format/common-format.html">
            
                <a href="../../common-format/common-format.html">
            
                    
                    2 常用命令格式
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../common-format/json/json.html">
            
                <a href="../../common-format/json/json.html">
            
                    
                    2.1 JSON文本
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../../common-format/json/type.html">
            
                <a href="../../common-format/json/type.html">
            
                    
                    2.1.1 JSON文本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="../../common-format/json/formatting.html">
            
                <a href="../../common-format/json/formatting.html">
            
                    
                    2.1.2 JSON样式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.3" data-path="../../common-format/json/event.html">
            
                <a href="../../common-format/json/event.html">
            
                    
                    2.1.3 JSON事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.4" data-path="../../common-format/json/array.html">
            
                <a href="../../common-format/json/array.html">
            
                    
                    2.1.4 JSON分项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.5" data-path="../../common-format/json/sign-book.html">
            
                <a href="../../common-format/json/sign-book.html">
            
                    
                    2.1.5 告示牌及成书
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.6" data-path="../../common-format/json/other.html">
            
                <a href="../../common-format/json/other.html">
            
                    
                    2.1.6 杂项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.7" data-path="../../common-format/json/keys.html">
            
                <a href="../../common-format/json/keys.html">
            
                    
                    2.1.A 附录: keybind列表
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../common-format/nbt/nbt.html">
            
                <a href="../../common-format/nbt/nbt.html">
            
                    
                    2.2 NBT及结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../common-format/nbt/simple.html">
            
                <a href="../../common-format/nbt/simple.html">
            
                    
                    2.2.1 基本类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../common-format/nbt/example.html">
            
                <a href="../../common-format/nbt/example.html">
            
                    
                    2.2.2 NBT实战
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../../command/command.html">
            
                <a href="../../command/command.html">
            
                    
                    3 如何执行命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../../command/chat.html">
            
                <a href="../../command/chat.html">
            
                    
                    3.1 聊天栏
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="../../command/cb.html">
            
                <a href="../../command/cb.html">
            
                    
                    3.2 命令方块简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="../../command/function.html">
            
                <a href="../../command/function.html">
            
                    
                    3.3 命令函数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="../scoreboard.html">
            
                <a href="../scoreboard.html">
            
                    
                    4 记分板
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="../objective.html">
            
                <a href="../objective.html">
            
                    
                    4.1 记分板变量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="../team.html">
            
                <a href="../team.html">
            
                    
                    4.2 记分板队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="../tag.html">
            
                <a href="../tag.html">
            
                    
                    4.3 记分板标签
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="../command.html">
            
                <a href="../command.html">
            
                    
                    4.4 记分板命令
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="../example.html">
            
                <a href="../example.html">
            
                    
                    4.5 记分板实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.1" data-path="example1.html">
            
                <a href="example1.html">
            
                    
                    4.5.1 循环电路|记分板的基础操作
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.2" data-path="example2.html">
            
                <a href="example2.html">
            
                    
                    4.5.2 自定义命令|stats与记分板
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3" data-path="example3.html">
            
                <a href="example3.html">
            
                    
                    4.5.3 击杀率|operation与准则
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.5.5.4" data-path="example4.html">
            
                <a href="example4.html">
            
                    
                    4.5.4 漂亮的排名|显示与队伍
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.5" data-path="example5.html">
            
                <a href="example5.html">
            
                    
                    4.5.5 简单登入系统|function与综合运用
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="../../logic/logic.html">
            
                <a href="../../logic/logic.html">
            
                    
                    5 基础逻辑
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="../../logic/enum.html">
            
                <a href="../../logic/enum.html">
            
                    
                    5.1 穷举
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="../../logic/score.html">
            
                <a href="../../logic/score.html">
            
                    
                    5.2 分数处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="../../logic/bool.html">
            
                <a href="../../logic/bool.html">
            
                    
                    5.3 布尔逻辑
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="../../logic/loop.html">
            
                <a href="../../logic/loop.html">
            
                    
                    5.4 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="../../logic/event.html">
            
                <a href="../../logic/event.html">
            
                    
                    5.5 事件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="../../logic/marker.html">
            
                <a href="../../logic/marker.html">
            
                    
                    5.6 实体Marker
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="../../logic/execute.html">
            
                <a href="../../logic/execute.html">
            
                    
                     5.7 execute进阶
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="../../practise/practise.html">
            
                <a href="../../practise/practise.html">
            
                    
                    6 实战
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="../../practise/objects.html">
            
                <a href="../../practise/objects.html">
            
                    
                    6.1 游戏内物件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="../../practise/test-debug.html">
            
                <a href="../../practise/test-debug.html">
            
                    
                    6.2 命令系统测试及调试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="../../practise/examples/examples.html">
            
                <a href="../../practise/examples/examples.html">
            
                    
                    6.3 更多命令系统例子
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="../../practise/examples/furnace.html">
            
                <a href="../../practise/examples/furnace.html">
            
                    
                    6.3.1 熔炉过热系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="../../practise/examples/badapple.html">
            
                <a href="../../practise/examples/badapple.html">
            
                    
                    6.3.2 毒苹果
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="../../practise/examples/rain.html">
            
                <a href="../../practise/examples/rain.html">
            
                    
                    6.3.3 下雨检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="../../practise/examples/chest_replace.html">
            
                <a href="../../practise/examples/chest_replace.html">
            
                    
                    6.3.4 替换方块实体
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="../../practise/examples/skill.html">
            
                <a href="../../practise/examples/skill.html">
            
                    
                    6.3.5 技能系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.6" data-path="../../practise/examples/crown.html">
            
                <a href="../../practise/examples/crown.html">
            
                    
                    6.3.6 皇冠系统
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.7" data-path="../../practise/examples/blackhole.html">
            
                <a href="../../practise/examples/blackhole.html">
            
                    
                    6.3.7 黑洞
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.8" data-path="../../practise/examples/login.html">
            
                <a href="../../practise/examples/login.html">
            
                    
                    6.3.8 登录系统
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="../../data-files/data-files.html">
            
                <a href="../../data-files/data-files.html">
            
                    
                    7 游戏文件的使用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" data-path="../../data-files/resourcepack/resourcepack.html">
            
                <a href="../../data-files/resourcepack/resourcepack.html">
            
                    
                    7.1 资源包
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1.1" data-path="../../data-files/resourcepack/textures.html">
            
                <a href="../../data-files/resourcepack/textures.html">
            
                    
                    7.1.1 材质
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.2" data-path="../../data-files/resourcepack/models.html">
            
                <a href="../../data-files/resourcepack/models.html">
            
                    
                    7.1.2 模型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.1.3" data-path="../../data-files/resourcepack/sound.html">
            
                <a href="../../data-files/resourcepack/sound.html">
            
                    
                    7.1.3 声音
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8.2" data-path="../../data-files/loot-table.html">
            
                <a href="../../data-files/loot-table.html">
            
                    
                    7.2 Loot table
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" data-path="../../data-files/advancements/advancements.html">
            
                <a href="../../data-files/advancements/advancements.html">
            
                    
                    7.3 Advancement
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.3.1" data-path="../../data-files/advancements/examples.html">
            
                <a href="../../data-files/advancements/examples.html">
            
                    
                    Advancement例子
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" >
            
                <span>
            
                    
                    8 杂项
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <a target="_blank" href="https://commandtutorials.neocities.org/">
            
                    
                    8.1 其他资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" data-path="../../misc/success.html">
            
                <a href="../../misc/success.html">
            
                    
                    8.2 如何成为一个成功的CBer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" data-path="../../misc/question.html">
            
                <a href="../../misc/question.html">
            
                    
                    8.3 问问题的技巧
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" data-path="../../misc/quotes.html">
            
                <a href="../../misc/quotes.html">
            
                    
                    8.4 其他CBer的建言
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >4.5.4 漂亮的排名|显示与队伍</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="&#x5B9E;&#x4F8B;4&#xFF1A;&#x6F02;&#x4EAE;&#x7684;&#x6392;&#x540D;&#x2014;&#x2014;&#x663E;&#x793A;&#x4E0E;&#x961F;&#x4F0D;">&#x5B9E;&#x4F8B;4&#xFF1A;&#x6F02;&#x4EAE;&#x7684;&#x6392;&#x540D;&#x2014;&#x2014;&#x663E;&#x793A;&#x4E0E;&#x961F;&#x4F0D;</h1>
<p>&#x4E0D;&#x5F97;&#x4E0D;&#x8BF4;&#xFF0C;&#x73A9;&#x5BB6;&#x4E4B;&#x95F4;&#x7684;&#x7ADE;&#x6280;&#x662F;Minecraft&#x7684;&#x4E00;&#x4E2A;&#x91CD;&#x8981;&#x7EC4;&#x6210;&#x90E8;&#x5206;&#x3002;&#x800C;&#x5728;&#x8BB0;&#x5206;&#x677F;&#x7CFB;&#x7EDF;&#x7684;&#x5E2E;&#x52A9;&#x4E0B;&#xFF0C;&#x7EC4;&#x7EC7;&#x8FD9;&#x7C7B;&#x7ADE;&#x8D5B;&#x5C06;&#x4F1A;&#x66F4;&#x52A0;&#x65B9;&#x4FBF;&#xFF0C;&#x4E5F;&#x66F4;&#x5177;&#x89C2;&#x8D4F;&#x6027;&#x3002;&#x73B0;&#x5728;&#x5047;&#x8BBE;&#x4E00;&#x4E2A;&#x60C5;&#x5883;&#x2014;&#x2014;&#x5728;&#x8FF7;&#x5BAB;&#x4E2D;&#x8FDB;&#x884C;&#x7684;&#x6B7B;&#x4EA1;&#x7ADE;&#x8D5B;&#x3002;</p>
<h2 id="&#x51C6;&#x5907;&#x5DE5;&#x4F5C;">&#x51C6;&#x5907;&#x5DE5;&#x4F5C;</h2>
<p>&#x5F88;&#x9057;&#x61BE;&#xFF0C;&#x8FD9;&#x4E2A;&#x6559;&#x7A0B;&#x5E76;&#x4E0D;&#x51C6;&#x5907;&#x6559;&#x4F60;&#x5982;&#x4F55;&#x642D;&#x5EFA;&#x4E00;&#x4E2A;&#x8FF7;&#x5BAB;&#x3002;&#x8FD9;&#x4E2A;&#x5DE5;&#x4F5C;&#x7559;&#x7ED9;&#x4F60;&#x81EA;&#x5DF1;&#x3002;</p>
<p>&#x73B0;&#x5728;&#x6765;&#x6784;&#x601D;&#x4E00;&#x4E0B;&#xFF0C;&#x9664;&#x4E86;&#x8FF7;&#x5BAB;&#x672C;&#x8EAB;&#xFF0C;&#x5B8C;&#x6210;&#x8FD9;&#x4E2A;&#x5730;&#x56FE;&#x9700;&#x8981;&#x4EC0;&#x4E48;&#xFF1A;</p>
<ul>
<li>&#x4E00;&#x4E2A;&#x53D8;&#x91CF;&#xFF0C;&#x8BB0;&#x5F55;&#x51FB;&#x6740;&#x5F97;&#x5206;</li>
<li>&#x4FA7;&#x8FB9;&#x680F;&#xFF0C;&#x5C06;&#x5206;&#x6570;&#x663E;&#x793A;&#x51FA;&#x6765;</li>
<li>&#x4E24;&#x4E2A;&#x961F;&#x4F0D;&#xFF0C;&#x8FD9;&#x4E24;&#x4E2A;&#x961F;&#x4F0D;&#x4E92;&#x76F8;&#x4E4B;&#x95F4;&#x8FDB;&#x884C;&#x5BF9;&#x6297;</li>
</ul>
<p>&#x524D;&#x4E24;&#x4E2A;&#x4EFB;&#x52A1;&#x5728;&#x524D;&#x9762;&#x7684;&#x5B9E;&#x4F8B;&#x4E2D;&#x5DF2;&#x7ECF;&#x4ECB;&#x7ECD;&#x8FC7;&#x4E86;&#xFF0C;&#x73B0;&#x5728;&#x53EA;&#x9700;&#x8981;&#x56DE;&#x987E;&#x4E00;&#x4E0B;&#x961F;&#x4F0D;&#x7684;&#x547D;&#x4EE4;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#x3002;</p>
<p>&#x597D;&#xFF0C;&#x8BA9;&#x6211;&#x4EEC;&#x5F00;&#x59CB;&#x5427;&#xFF01;</p>
<h2 id="&#x521D;&#x6B21;&#x5B9E;&#x73B0;">&#x521D;&#x6B21;&#x5B9E;&#x73B0;</h2>
<p>&#x73B0;&#x5728;&#x521B;&#x5EFA;&#x4E24;&#x4E2A;&#x961F;&#x4F0D;&#xFF0C;&#x4E00;&#x4E2A;&#x53EB;CT&#xFF0C;&#x4E00;&#x4E2A;&#x53EB;T&#xFF1A;</p>
<pre><code>scoreboard teams add CT
scoreboard teams add T
</code></pre><p><img src="images/scbt4.1.png" alt=""><br>&#x8FD9;&#x4E24;&#x4E2A;&#x961F;&#x4F0D;&#x4F7F;&#x7528;&#x4E0D;&#x540C;&#x7684;&#x989C;&#x8272;&#xFF0C;&#x90A3;&#x4E48;&#x5C31;&#x9700;&#x8981;&#x7528;&#x4FEE;&#x6539;color&#xFF1A;</p>
<pre><code>scoreboard teams option CT color blue
scoreboard teams option T color gold
</code></pre><p>&#x540C;&#x65F6;&#x56E0;&#x4E3A;&#x53CB;&#x519B;&#x706B;&#x529B;&#x9ED8;&#x8BA4;&#x5F00;&#x542F;&#xFF0C;&#x6211;&#x4EEC;&#x53C8;&#x4E0D;&#x5E0C;&#x671B;&#x53CB;&#x519B;&#x4E4B;&#x95F4;&#x8BEF;&#x4F24;&#xFF0C;&#x6240;&#x4EE5;&#x8981;&#x4FEE;&#x6539;friendlyfire&#xFF1A;</p>
<pre><code>scoreboard teams option CT friendlyfire false
scoreboard teams option T friendlyfire false
</code></pre><p>&#x540D;&#x79F0;&#x724C;&#x5728;&#x8FF7;&#x5BAB;&#x4E2D;&#x662F;&#x4E2A;&#x95EE;&#x9898;&#x2014;&#x2014;&#x5B83;&#x4F1A;&#x5E26;&#x6765;&#x900F;&#x89C6;&#x4E00;&#x6837;&#x7684;&#x6548;&#x679C;&#x3002;&#x6240;&#x4EE5;&#x8981;&#x628A;&#x540D;&#x79F0;&#x724C;&#x9690;&#x85CF;&#x8D77;&#x6765;&#xFF1A;</p>
<pre><code>scoreboard teams option CT nametagVisibility hideForOtherTeams
scoreboard teams option T nametagVisibility hideForOtherTeams
</code></pre><p>&#x5F53;&#x7136;&#x4E5F;&#x53EF;&#x4EE5;&#x628A;hideForOtherTeams&#x6362;&#x6210;never&#xFF0C;&#x8FD9;&#x4E2A;&#x7531;&#x4F60;&#x81EA;&#x5DF1;&#x51B3;&#x5B9A;&#x3002;</p>
<p>&#x63A5;&#x4E0B;&#x6765;&#x662F;&#x78B0;&#x649E;&#x7684;&#x95EE;&#x9898;&#x3002;&#x5728;&#x8FD9;&#x79CD;&#x5A31;&#x4E50;&#x7ADE;&#x8D5B;&#x4E2D;&#x540C;&#x961F;&#x73A9;&#x5BB6;&#x4E00;&#x822C;&#x4E0D;&#x91C7;&#x7528;&#x78B0;&#x649E;&#xFF0C;&#x4F46;&#x662F;&#x548C;&#x5176;&#x4ED6;&#x961F;&#x4F0D;&#x4E4B;&#x95F4;&#x5E94;&#x8BE5;&#x4FDD;&#x7559;&#x78B0;&#x649E;&#x3002;&#x6240;&#x4EE5;&#x4FEE;&#x6539;&#x4E00;&#x4E0B;collisionRule&#xFF1A;</p>
<pre><code>scoreboard teams option CT collisionRule pushOtherTeams
scoreboard teams option T collisionRule pushOtherTeams
</code></pre><p>&#x597D;&#x4E86;&#xFF0C;&#x961F;&#x4F0D;&#x7684;&#x57FA;&#x672C;&#x8BBE;&#x7F6E;&#x5B8C;&#x6210;&#x4E86;&#x3002;&#x73B0;&#x5728;&#x8FD8;&#x5DEE;&#x4E00;&#x6837;&#xFF0C;&#x4FEE;&#x6539;&#x524D;&#x7F00;&#x3002;&#x4F46;&#x662F;option&#x91CC;&#x5E76;&#x4E0D;&#x63D0;&#x4F9B;&#x524D;&#x7F00;&#x4FEE;&#x6539;&#xFF0C;&#x600E;&#x4E48;&#x529E;&#x5462;&#xFF1F;</p>
<blockquote>
<p>&#x8FD9;&#x91CC;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;NBT&#x4FEE;&#x6539;&#x5668;&#x7684;&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;<br><a href="http://www.mcbbs.net/thread-306895-1-1.html" target="_blank">http://www.mcbbs.net/thread-306895-1-1.html</a></p>
</blockquote>
<p>&#x6253;&#x5F00;NBT Explorer&#xFF0C;&#x6309;&#x7167;<a href="../team.html">4.2 &#x8BB0;&#x5206;&#x677F;&#x961F;&#x4F0D;</a>&#x63D0;&#x4F9B;&#x7684;&#x8DEF;&#x5F84;&#xFF0C;&#x627E;&#x5230;&#x524D;&#x7F00;&#x5E76;&#x4FEE;&#x6539;&#x3001;&#x4FDD;&#x5B58;&#x3002;&#x6253;&#x5F00;&#x6E38;&#x620F;&#xFF0C;&#x4F60;&#x5C31;&#x80FD;&#x770B;&#x5230;&#x7C7B;&#x4F3C;&#x8FD9;&#x6837;&#x7684;&#x6548;&#x679C;&#x4E86;&#xFF1A;<br><img src="images/scbt4.2.png" alt=""><br><br><img src="images/scbt4.3.png" alt=""></p>
<p>&#xFF08;&#x8FD9;&#x91CC;&#x4F7F;&#x7528;&#x7684;&#x524D;&#x7F00;&#x662F;<code>[T]</code>&#x3002;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#x53EA;&#x4FEE;&#x6539;&#x4E86;&#x524D;&#x7F00;&#xFF0C;&#x5982;&#x679C;&#x4F60;&#x8981;&#x6DFB;&#x52A0;&#x540E;&#x7F00;&#xFF0C;&#x52A1;&#x5FC5;&#x8BB0;&#x5F97;&#x5728;&#x672B;&#x5C3E;&#x52A0;&#x4E0A;<code>&#xA7;r</code>&#x3002;&#xFF09;</p>
<p>&#x5230;&#x8FD9;&#x91CC;&#x961F;&#x4F0D;&#x7684;&#x8BBE;&#x7F6E;&#x5C31;&#x7ED3;&#x675F;&#x4E86;&#x3002;&#x63A5;&#x4E0B;&#x6765;&#x662F;&#x8BBE;&#x7F6E;&#x53D8;&#x91CF;&#x548C;&#x663E;&#x793A;&#x5728;&#x4FA7;&#x8FB9;&#x680F;&#xFF1A;</p>
<pre><code>scoreboard objectives add dmscore playerKillCount #&#x56E0;&#x4E3A;friendlyfire&#x5DF2;&#x7ECF;&#x5173;&#x95ED;&#xFF0C;&#x6240;&#x4EE5;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7EDF;&#x8BA1;&#x51FB;&#x6740;&#x73A9;&#x5BB6;&#x7684;&#x6B21;&#x6570;
scoreboard objectives setdisplay sidebar dmscore
</code></pre><p>&#x5B8C;&#x6210;&#xFF01;&#x8981;&#x5F00;&#x59CB;&#x6E38;&#x620F;&#xFF0C;&#x8FD8;&#x5F97;&#x628A;&#x5C0F;&#x4F19;&#x4F34;&#x52A0;&#x5165;&#x961F;&#x4F0D;&#x4E2D;&#x3002;</p>
<pre><code>scoreboard teams join T @p
scoreboard teams join CT @p
</code></pre><p>&#x5173;&#x4E8E;&#x4EBA;&#x6570;&#x5E73;&#x8861;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#x5C31;&#x8BF7;&#x4F60;&#x81EA;&#x5DF1;&#x63A2;&#x7A76;&#x4E86;&#x3002;</p>
<blockquote>
<p>&#x5728;&#x8FD9;&#x91CC;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x4EBA;&#x6570;&#x5E73;&#x8861;&#x95EE;&#x9898;&#x7684;&#x89E3;&#x51B3;&#x601D;&#x8DEF;&#xFF1A;</p>
<ol>
<li>&#x8BBE;&#x7F6E;&#x547D;&#x4EE4;&#x65B9;&#x5757;&#xFF0C;&#x9644;&#x4E0A;&#x6309;&#x94AE;&#x6216;&#x8005;&#x8E0F;&#x677F;&#xFF0C;&#x8BA9;&#x73A9;&#x5BB6;&#x81EA;&#x5DF1;&#x9009;&#x62E9;&#x961F;&#x4F0D;</li>
<li>&#x6BCF;&#x6709;&#x4E00;&#x4E2A;&#x73A9;&#x5BB6;&#x52A0;&#x5165;&#x4E00;&#x4E2A;&#x961F;&#x4F0D;&#x5219;&#x7ED9;&#x5BF9;&#x5E94;&#x53D8;&#x91CF;&#x52A0;&#x5206;</li>
<li>&#x5982;&#x679C;&#x5206;&#x6570;&#x8FBE;&#x5230;&#x9650;&#x5B9A;&#x503C;&#x5219;&#x66F4;&#x6539;&#x52A0;&#x5165;&#x961F;&#x4F0D;&#x547D;&#x4EE4;&#x65B9;&#x5757;&#x7684;&#x547D;&#x4EE4;&#xFF0C;&#x6BD4;&#x5982;&#x663E;&#x793A;&#x201C;&#x961F;&#x4F0D;&#x5DF2;&#x6EE1;&#x201D;</li>
<li>&#x8FD8;&#x6709;&#x5F88;&#x591A;&#x79CD;&#x65B9;&#x6CD5;&#xFF0C;&#x4F60;&#x53EF;&#x4EE5;&#x81EA;&#x5DF1;&#x53D1;&#x6325;&#x60F3;&#x8C61;&#xFF01;</li>
</ol>
</blockquote>
<p>&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x7ED9;&#x6E38;&#x620F;&#x8BA1;&#x65F6;&#xFF0C;&#x65F6;&#x95F4;&#x5230;&#x4E86;&#x4EE5;&#x540E;&#x628A;&#x6240;&#x6709;&#x73A9;&#x5BB6;&#x79FB;&#x51FA;&#x961F;&#x4F0D;&#x5E76;&#x4F20;&#x9001;&#x5230;&#x6307;&#x5B9A;&#x4F4D;&#x7F6E;&#x3002;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x7684;&#x9009;&#x62E9;&#x5668;&#x53C2;&#x6570;&#x4E3A;<code>team</code>&#x3002;</p>
<h2 id="&#x518D;&#x6B21;&#x5B9E;&#x73B0;">&#x518D;&#x6B21;&#x5B9E;&#x73B0;</h2>
<p>&#x5B9E;&#x9645;&#x4E0A;&#x521A;&#x624D;&#x7684;&#x88C5;&#x7F6E;&#x6BD4;&#x8F83;&#x7B80;&#x964B;&#xFF0C;&#x9002;&#x5408;&#x5C0F;&#x4F19;&#x4F34;&#x4E4B;&#x95F4;&#x7684;&#x5C0F;&#x578B;&#x6BD4;&#x8D5B;&#xFF0C;&#x5982;&#x679C;&#x8981;&#x62FF;&#x6765;&#x4F5C;&#x4E3A;&#x5730;&#x56FE;&#x53D1;&#x5E03;&#x6216;&#x8BB8;&#x662F;&#x62FF;&#x4E0D;&#x51FA;&#x624B;&#x7684;&#x3002;&#x56E0;&#x6B64;&#x6211;&#x4EEC;&#x8FD8;&#x53EF;&#x4EE5;&#x5BF9;&#x73B0;&#x6709;&#x7684;&#x7CFB;&#x7EDF;&#x8FDB;&#x884C;&#x8FDB;&#x4E00;&#x6B65;&#x7684;&#x4F18;&#x5316;&#x3002;</p>
<h3 id="&#x7ED9;&#x540D;&#x5B57;&#x52A0;&#x4E0A;&#x989C;&#x8272;">&#x7ED9;&#x540D;&#x5B57;&#x52A0;&#x4E0A;&#x989C;&#x8272;</h3>
<p>&#x5982;&#x679C;&#x5355;&#x5355;&#x8BBE;&#x7F6E;&#x524D;&#x7F00;&#x4E3A;&#x961F;&#x4F0D;&#x540D;&#x79F0;&#x53EF;&#x80FD;&#x6709;&#x4E9B;&#x5355;&#x8C03;&#xFF0C;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x7528;&#x6837;&#x5F0F;&#x4EE3;&#x7801;&#x4FEE;&#x6539;&#x524D;&#x7F00;&#x3002;&#x4F8B;&#x5982;&#xFF0C;&#x524D;&#x7F00;<code>&#xA7;6[T]</code>&#x53EF;&#x4EE5;&#x4F7F;&#x961F;&#x4F0D;&#x62E5;&#x6709;&#x5982;&#x4E0B;&#x6548;&#x679C;&#xFF1A;<br><img src="images/scbt4.4.png" alt=""><br>&#x6709;&#x5173;&#x6837;&#x5F0F;&#x4EE3;&#x7801;&#x7684;&#x66F4;&#x591A;&#x4FE1;&#x606F;&#x89C1;<a href="../../common-format/nbt/example.html">2.2.2 NBT&#x5B9E;&#x6218;</a>&#x7684;<strong>&#x6837;&#x5F0F;&#x4EE3;&#x7801;</strong>&#x90E8;&#x5206;</p>
<h3 id="&#x53EA;&#x7EDF;&#x8BA1;&#x6E38;&#x620F;&#x53C2;&#x4E0E;&#x8005;&#x7684;&#x51FB;&#x6740;&#x6570;">&#x53EA;&#x7EDF;&#x8BA1;&#x6E38;&#x620F;&#x53C2;&#x4E0E;&#x8005;&#x7684;&#x51FB;&#x6740;&#x6570;</h3>
<p>&#x5728;&#x4E0A;&#x9762;&#x7684;&#x5B9E;&#x4F8B;&#x4E2D;&#x4F7F;&#x7528;&#x4E86;playerKillCount&#x8FD9;&#x4E2A;&#x5224;&#x636E;&#xFF0C;&#x7136;&#x800C;&#x5982;&#x679C;&#x5728;&#x4E00;&#x4E2A;&#x5927;&#x670D;&#x52A1;&#x5668;&#x4E2D;&#x8FD0;&#x884C;&#x8FD9;&#x6837;&#x7684;&#x6E38;&#x620F;&#xFF0C;&#x53EF;&#x80FD;&#x4F1A;&#x51FA;&#x73B0;<strong>&#x65E0;&#x5173;&#x4EBA;&#x58EB;&#x4E0A;&#x699C;</strong>&#x7684;&#x73B0;&#x8C61;&#x3002;&#x56E0;&#x6B64;&#x53EF;&#x4EE5;&#x7ED3;&#x5408;teamkill.<color>&#x5224;&#x636E;&#x548C;operation&#x547D;&#x4EE4;&#x5B9E;&#x73B0;&#x53EA;&#x7EDF;&#x8BA1;&#x6E38;&#x620F;&#x53C2;&#x4E0E;&#x8005;&#x7684;&#x51FB;&#x6740;&#x6570;&#x3002;&#x5177;&#x4F53;&#x547D;&#x4EE4;&#x5982;&#x4E0B;&#xFF1A;</color></p>
<pre><code>#&#x65B0;&#x5EFA;&#x53D8;&#x91CF;
scoreboard objectives add dmscoreT teamkill.blue
scoreboard objectives add dmscoreCT teamkill.gold

#&#x9AD8;&#x9891;&#x8FD0;&#x884C;&#x8D4B;&#x5206;&#x547D;&#x4EE4;
execute @e[team=T] ~ ~ ~ scoreboard players operation @s dmscore = @s dmscoreT
execute @e[team=CT] ~ ~ ~ scoreboard players operation @s dmscore = @s dmscoreCT
</code></pre><h3 id="&#x7F8E;&#x5316;&#x7684;&#x4FA7;&#x8FB9;&#x680F;">&#x7F8E;&#x5316;&#x7684;&#x4FA7;&#x8FB9;&#x680F;</h3>
<p>&#x4FA7;&#x8FB9;&#x680F;&#x7684;&#x529F;&#x80FD;&#x5E76;&#x4E0D;&#x53EA;&#x662F;&#x663E;&#x793A;&#x73A9;&#x5BB6;&#x548C;&#x5206;&#x6570;&#xFF0C;&#x5229;&#x7528;&#x4FA7;&#x8FB9;&#x680F;&#xFF0C;&#x4F60;&#x751A;&#x81F3;&#x53EF;&#x4EE5;&#x505A;&#x51FA;&#x4E00;&#x4E2A;&#x663E;&#x793A;&#x5C4F;&#xFF01;&#x73B0;&#x5728;&#x6211;&#x4EEC;&#x5229;&#x7528;&#x4FA7;&#x8FB9;&#x680F;&#x505A;&#x4E00;&#x4E2A;&#x52A0;&#x5165;&#x961F;&#x4F0D;&#x7684;&#x4FE1;&#x606F;&#x63D0;&#x793A;&#x3002;</p>
<p>&#x9996;&#x5148;&#x8981;&#x6DFB;&#x52A0;&#x53D8;&#x91CF;&#xFF1A;</p>
<pre><code>scoreboard objectives add info dummy &#x516C;&#x544A;&#x680F;
</code></pre><p>MC&#x91CC;&#x4E0D;&#x80FD;&#x76F4;&#x63A5;&#x8F93;&#x5165;&#x6837;&#x5F0F;&#x4EE3;&#x7801;&#xFF0C;&#x6240;&#x4EE5;&#x6211;&#x4EEC;&#x7528;function&#x6765;&#x5236;&#x4F5C;&#x5E26;&#x989C;&#x8272;&#x7684;&#x5047;&#x540D;&#xFF1A;</p>
<pre><code># &#x4EE5;&#x4E0B;&#x547D;&#x4EE4;&#x4F7F;&#x7528;function&#x8FD0;&#x884C;
# &#x5206;&#x6570;&#x7528;&#x6765;&#x6392;&#x5E8F;&#x4FE1;&#x606F;
# &#x7B2C;&#x56DB;&#x884C;&#x8F93;&#x5165;&#x4E24;&#x6B21;&#xA7;4&#x662F;&#x4E3A;&#x4E86;&#x533A;&#x5206;&#x5047;&#x540D;&#x3002;reset&#x547D;&#x4EE4;&#x6E05;&#x9664;&#x4E00;&#x4E2A;&#x5E26;&#x6837;&#x5F0F;&#x4EE3;&#x7801;&#x7684;&#x5047;&#x540D;&#x65F6;&#xFF0C;&#x4E5F;&#x9700;&#x8981;&#x5E26;&#x4E0A;&#x76F8;&#x540C;&#x7684;&#x6837;&#x5F0F;&#x4EE3;&#x7801;
scoreboard players set &#xA7;4============ info 3
scoreboard players set &#xA7;6&#x52A0;&#x5165;T&#x961F;&#x8BF7;&#x5230;&#x7EA2;&#x533A; info 2
scoreboard players set &#xA7;1&#x52A0;&#x5165;CT&#x961F;&#x8BF7;&#x5230;&#x84DD;&#x533A; info 1
scoreboard players set &#xA7;4&#xA7;4============ info 0
</code></pre><p>&#x6548;&#x679C;&#x5982;&#x4E0B;&#xFF1A;<br><img src="images/scbt4.5.png" alt=""></p>
<h3 id="&#x7EDF;&#x8BA1;&#x961F;&#x4F0D;&#x603B;&#x5206;">&#x7EDF;&#x8BA1;&#x961F;&#x4F0D;&#x603B;&#x5206;</h3>
<p>&#x8FD9;&#x4E2A;&#x53EA;&#x9700;&#x8981;&#x6BCF;&#x4E2A;&#x961F;&#x4F0D;&#x4E00;&#x6761;&#x547D;&#x4EE4;&#x5C31;&#x53EF;&#x4EE5;&#x4E86;&#xFF08;&#x4F46;&#x662F;&#x6B64;&#x65B9;&#x6CD5;&#x4E0D;&#x9002;&#x7528;&#x4E8E;&#x5047;&#x540D;&#xFF09;&#xFF1A;</p>
<pre><code>scoreboard players operation TotalT dmscore += @e[team=T] dmscore
scoreboard players operation TotalCT dmscore += @e[team=CT] dmscore
</code></pre><p>&#x5982;&#x679C;&#x5728;function&#x4E2D;&#x8FD0;&#x884C;&#xFF0C;&#x4F60;&#x8FD8;&#x53EF;&#x4EE5;&#x987A;&#x4FBF;&#x4E3A;&#x8FD9;&#x4E24;&#x4E2A;&#x603B;&#x5206;&#x8BA1;&#x6570;&#x5668;&#x52A0;&#x4E0A;&#x989C;&#x8272;&#x3002;</p>
<hr>
<p><img src="images/scbt4.6.png" alt=""></p>

                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="example3.html" class="navigation navigation-prev " aria-label="Previous page: 4.5.3 击杀率|operation与准则">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="example5.html" class="navigation navigation-next " aria-label="Next page: 4.5.5 简单登入系统|function与综合运用">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"4.5.4 漂亮的排名|显示与队伍","level":"1.5.5.4","depth":3,"next":{"title":"4.5.5 简单登入系统|function与综合运用","level":"1.5.5.5","depth":3,"path":"scoreboard/examples/example5.md","ref":"scoreboard/examples/example5.md","articles":[]},"previous":{"title":"4.5.3 击杀率|operation与准则","level":"1.5.5.3","depth":3,"path":"scoreboard/examples/example3.md","ref":"scoreboard/examples/example3.md","articles":[]},"dir":"ltr"},"config":{"plugins":["expandable-chapters","lb2br","-sharing"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"expandable-chapters":{},"lb2br":{},"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"命令进阶","language":"en","gitbook":"*","description":"一份Minecraft命令教程"},"file":{"path":"scoreboard/examples/example4.md","mtime":"2017-08-16T00:26:58.209Z","type":"markdown"},"gitbook":{"version":"3.2.2","time":"2017-11-08T10:37:55.949Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

